package com.huike.contract.mapper;

import com.huike.contract.domain.dto.TransferPageQueryDTO;
import com.huike.contract.domain.vo.TransferVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: zhu
 * @Description: TransferMapper
 * @DateTime: 2023/10/17 2:29
 **/
@Mapper
public interface TransferMapper {

    /**
     * 获取转派列表
     *
     * @param transferPageQueryDTO
     * @return
     */
    List<TransferVo> pageTransfer(TransferPageQueryDTO transferPageQueryDTO);

    Integer findCountByTypeAndId(Integer userId, String type);

    @Select("select max_number from tb_rule_pool where type = #{type}")
    Integer findMaxNumber(String type);

    void updateAssignId(@Param("transferUserId") Integer transferUserId,
                        @Param("userId") Integer userId,
                        @Param("type") String type,
                        @Param("transferUserName") String transferUserName,
                        @Param("transferUserDeptId") Long transferUserDeptId);
}